<?php
/*************************************************

广告位主模型 - the 
Author: WangHuabin <17-5-27>

*************************************************/
namespace Home\Model;
use Think\Model\RelationModel;
class AdPositionModel extends RelationModel {


    //查询单数据
    public function get_one($map){
        $data = $this->where($map)->find();
        return $data;
    }

    //更新
    public function edit($map,$data){
        $r = $this->where($map)->save($data);
        return $r;
    }

    //添加
    public function add($data){
        $data =M('AdPosition')->data($data)->add();
        return $data;
    }
    

}